<?php
/**
 * Create by 11li
 * Date 2020/3/30
 * Time 23:38
 *
 */

namespace app\common\service\v2;


use app\common\model\Commission;
use think\Db;

class CommissionService
{
	/**
	 * 添加返利记录
	 * @param $userId 用户ID
	 * @param $relationUserId 关联用户ID
	 * @param $orderId 订单ID
	 * @param $goodsId
	 * @param $orderGoodsId
	 * @param $amount
	 * @param $type
	 * @return false|int
	 */
	public static function addRecord($userId, $relationUserId, $orderId, $goodsId, $orderGoodsId, $amount, $type)
	{
		return (new Commission())->addRow($userId, $relationUserId, $orderId, $goodsId, $orderGoodsId, $amount, $type);
	}
}